﻿using System;
using System.ComponentModel.Composition;
using MediaAssistant.Controls.StatusMessageBar;
using MefBasic.Helper;

namespace MediaAssistant.Management
{
    [Export]
    public class StatusMessageService
    {
        [Import]
        private Lazy<StatusMessageBarPresenter> StatusMessageBar { get; set; }
        public void SetStatusMessage(string message)
        {
            SynchronizationContextHelper.Instance.Send(d => StatusMessageBar.Value.Message = (string) d,message);
        }
    }
}
